<?php
define('CSS_JS_VERSION', '0.0.1');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="pl" />
    <title>Baza Szkód Transportowych | Volkswagen Group Polska</title>
    <?php foreach ($this->cssFiles as $file): ?>
      <link href="<?php echo($file); ?>" rel="stylesheet" media="screen">
      <?php endforeach; ?>
      <link rel="Shortcut icon" href="/favicon.ico?ver=1.1" />
  </head>
  <body data-spy="scroll" data-target=".damage-scrollspy">
    <div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true"></div>
    <div id="mainContainer">
      <div id="page">
        <div id="pageContent" class="center">
          <div id="head">
            <a id="headL" href="/"><span class="project-logo"></span></a>
            <a id="headR" href="http://vw-group.pl/"><span class="project-logo"></span></a>
            <div id="clock" class="right">
              <i class="fa fa-clock-o"></i>
              <div id="clockContent"></div>
            </div>
          </div>
          <div id="container">
            <div id="headContainer">

            </div>
            <div id="bodyContainer"></div>
          </div>
        </div>
      </div>
      <div id="foot">
        <div id="footHolder" class="center">
          <a id="footercreated" onclick="javascript:this.target='_blank';" title="Created by Gmind Software House" href="http://www.gmind.pl"></a>
          <p>
            © Volkswagen Group Polska 2013 | 
            <a onclick="javascript:this.target='_blank'" href="http://vw-group.pl/">www.vw-group.pl</a>
          </p>
          <p style="display: block; text-align: right; width: 960px;">
            Baza Szkód Transportowych <?php echo CSS_JS_VERSION ?>
          </p>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>

    <div id="preloader" style="display: none;">
      <img src="/images/preloader.gif" />
      <div class="preloader-background"></div>
    </div>

    <?php require('/modules/damages/js/templates/main.php'); ?>
    <?php require('/modules/damages/js/templates/login.php'); ?>
    <?php require('/modules/damages/js/templates/topBar.php'); ?>
    <?php require('/modules/damages/js/templates/topBarSubtitle.php'); ?>
    <?php require('/modules/damages/js/templates/userInfo.php'); ?>
    <?php require('/modules/damages/js/templates/tile.php'); ?>
    <?php require('/modules/damages/js/templates/newDamage.php'); ?>
    <?php require('/modules/damages/js/templates/newDamageList.php'); ?>
    <?php require('/modules/damages/js/templates/listDamages.php'); ?>
    <?php require('/modules/damages/js/templates/settings.php'); ?>
    <?php require('/modules/damages/js/templates/dictionariesManagement.php'); ?>
    <?php require('/modules/damages/js/templates/processManagement.php'); ?>
    <?php require('/modules/damages/js/templates/popupWindow.php'); ?>
    <?php require('/modules/damages/js/templates/emailTemplate.php'); ?>
    <?php require('/modules/damages/js/templates/listManagement.php'); ?>
    <?php require('/modules/damages/js/templates/expirationsManagement.php'); ?>
    <?php require('/modules/damages/js/templates/changePassword.php'); ?>
    <?php require('/modules/damages/js/templates/report.php'); ?>
    <?php require('/modules/damages/js/templates/usersManagement.php'); ?>
    <?php require('/js/templates/dialogMessage.php'); ?>
    
    <?php foreach ($this->jsFiles as $file): ?>
      <script type="text/javascript" src="<?php echo($file); ?>"></script>
    <?php endforeach; ?>

    <script type="text/javascript">
      var IP = '<?php echo $_SERVER['REMOTE_ADDR']; ?>';
      var lang = '';
      var segments = window.location.pathname.split('/');
      segments.shift();
      if (segments[0] != undefined) {
        var lang = segments[0];
      }
      if (lang != '') {
        if (LANGUAGES.indexOf(lang) == -1) {
          lang = DEFAULT_LANGUAGE;
        }
      } else {
        lang = DEFAULT_LANGUAGE;
      }
      var router = new APP.Routers.MainRouter({language: lang});
    </script>
  </body>
</html>
